package com.example.demo.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(RTCProperties.class)
public class RTCAutoConfiguration {

    @Bean
    public RTCOperations rtcOperations(RTCProperties rtcProperties) {
        return new RTCOperations(rtcProperties.getSdkAppId(), rtcProperties.getSecret());
    }

}
